<!DOCTYPE html>
<html>
<head>
    %{--<meta name="layout" content="main">--}%
    <title>User Register</title>

    <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'css', file: 'bootstrap.min.css')}">

    <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'css', file: 'templatemo-style.css')}">
    <link rel="stylesheet" type="text/css" href="${createLinkTo(dir: 'font-awesome/css', file: 'font-awesome.min.css')}">
    <link rel="stylesheet"  type="text/css" href="${createLinkTo(dir: 'css', file: 'agency.css')}">
    <script src="${createLinkTo(dir: 'js', file: 'jquery-2.0.0.min.js')}"></script>
    <script src="${createLinkTo(dir: 'js', file: 'jquery.js')}"></script>
</head>

<body  style="background-image:url('../img/header-bg.jpg')">

<nav class="navbar navbar-default  navbar-shrink">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand page-scroll" href="#page-top">GDepot</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <li class="hidden">
                    <a href="#page-top"></a>
                </li>
                <li><a href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
                <li>
                    <g:link class="page-scroll" controller="signIn" action="auth">Login In</g:link>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>


<g:if test="${flash.message}">
    <div class="alert alert-warning">
        <a href="#" class="close" data-dismiss="alert">
        &times;
        </a>
        <strong>${flash.message}</strong>
    </div>
</g:if>

<g:hasErrors bean="${userInstance}">
    <div class="row">
        <div class="container">
            <div class="alert alert-danger" role="alert">
                <ul class="errors" role="alert">
                    <g:eachError bean="${userInstance}" var="error">
                        <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                                error="${error}"/></li>
                    </g:eachError>
                </ul>
            </div>
        </div>
    </div>
</g:hasErrors>

<div class="row">
    <div class="container col-md-6 col-md-offset-3">
        <div class="panel panel-primary">

            <div class="panel-heading" style="background-color: #222">User Register</div>

            <div class="panel-body">
                <g:form url="[resource: userInstance, action: 'saveUser']" class="form-horizontal">
                    <fieldset class="form">
                        <g:render template="form1"/>
                    </fieldset>
                    <fieldset class="buttons">
                        <g:submitButton name="register" class="btn btn-success btn-block" value="register"/>
                    </fieldset>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
